package ru.pb.game.network.engine.client.packets.receivable;

import ru.pb.game.network.engine.client.packets.FromClientToGameServerPacket;
import ru.pb.game.network.engine.client.packets.sendable.PROTOCOL_BASE_ENTER_PROFILE_ACK;
import ru.pb.game.objects.model.players.Player;
import ru.pb.game.objects.model.players.enums.SLOT_STATE;

public class PROTOCOL_BASE_ENTER_PROFILE_REQ extends FromClientToGameServerPacket
{

	@Override
	public void readImpl()
	{}

	@Override
	public void runImpl()
	{
		Player p = getPlayer();
		if(p != null)
		{
			if(p.getRoom() != null)
				p.getRoom().changeSlotState(p.getSlot(), SLOT_STATE.SLOT_STATE_INFO);
			p.sendPacket(new PROTOCOL_BASE_ENTER_PROFILE_ACK());
		}
	}
}
